package net.zjitc.shopping;

/**
 * @Author admin
 * @Date 2019/3/12 14:55
 * 测试类：
 * main（）方法：创建对象、调用方法
 */
public class Testegg {
    public static void main(String[] args) {
        /*1.创建若干个商品对象
        2.创建超市对象
        3.超市对象中添加一些商品
        4.创建顾客对象
        5.调用顾客对象的shopping方法
        * */
        Goods goods1 = new Goods();
        goods1.setgName("茶叶蛋");
        Goods goods2 = new Goods();
        goods2.setgName("冰阔落");

        Tenzu tenzu = new Tenzu();
        tenzu.setName("十足");
        Goods[] goods={goods1,goods2};
        tenzu.setGoodsArray(goods);

        Custom custom = new Custom();
        custom.setcName("小王");
        custom.shopping(tenzu,"茶叶蛋");
        custom.shopping(tenzu,"作业");

    }

}
